
//
//  AddClubCell.m
//  LoveTrail
//
//  Created by giantumbrella on 15/6/28.
//  Copyright (c) 2015年 赵娟. All rights reserved.
//

#import "AddClubCell.h"
#import "CommonMacro.h"


@interface AddClubCell()
@property (nonatomic,strong) UIImageView *titleImageView;
@property (nonatomic,strong) UILabel *titleLabel;
@property (nonatomic,strong) UILabel *topicLabel;
@property (nonatomic,strong) UILabel *memberLabel;
@property (nonatomic,strong) UIView *bgView;
@end
@implementation AddClubCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    
    //0.
    self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT*0.18)];
    [self addSubview:self.bgView];
//    self.bgView.backgroundColor = [UIColor brownColor];
    
    //1.图片
    self.titleImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 13, self.bgView.frame.size.height*0.8, self.bgView.frame.size.height*0.8)];
    [self.bgView addSubview:self.titleImageView];
    self.titleImageView.layer.cornerRadius = 5;
    self.titleImageView.clipsToBounds = YES;
    self.titleImageView.image = [UIImage imageNamed:@"俱乐部"];
    
    //2.标题
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.titleImageView.frame.size.width+self.imageView.frame.origin.x+20, self.titleImageView.frame.origin.y+5, self.bgView.frame.size.width*0.54, self.bgView.frame.size.height*0.3)];
    [self.bgView addSubview:self.titleLabel];
//    self.titleLabel.backgroundColor = [UIColor greenColor];
    self.titleLabel.text = @"带着节操去旅行";
    self.topicLabel.textColor = UIColorWithRGBA(51, 51, 51, 1);
    self.topicLabel.font = [UIFont boldSystemFontOfSize:18];
    
    //3.话题
    self.topicLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.titleLabel.frame.origin.x, self.titleLabel.frame.size.height+self.titleLabel.frame.origin.y, self.bgView.frame.size.width*0.27, self.bgView.frame.size.height*0.3)];
//    self.topicLabel.backgroundColor = [UIColor blueColor];
    [self.bgView addSubview:self.topicLabel];
    self.topicLabel.text = @"话题 (2175)";
    self.topicLabel.textColor = UIColorWithRGBA(202, 202, 202, 1);
    self.topicLabel.font = [UIFont boldSystemFontOfSize:15];
    
    //4.组员
    self.memberLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.topicLabel.frame.size.width+self.topicLabel.frame.origin.x+5, self.topicLabel.frame.origin.y, self.topicLabel.frame.size.width, self.topicLabel.frame.size.height)];
    [self.bgView addSubview:self.memberLabel];
//    self.memberLabel.backgroundColor = [UIColor grayColor];
    self.memberLabel.text = @"组员 (1866)";
    self.memberLabel.textColor = UIColorWithRGBA(202, 202, 202, 1);
    self.memberLabel.font = [UIFont boldSystemFontOfSize:15];
}


@end
